#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

bool isPrime(long long n)
{
    for (long long i = 2; i <= n / i; i++)
        if (n % i == 0)
            return false;
    return true;
}

int main()
{
    string s;
    cin >> s;

    for (int i = s.size() - 2; i >= 0; i--)
        s += s[i];
    long long ss = stoll(s);

    if (isPrime(ss))
        cout << "prime" << endl;
    else
        cout << "noprime" << endl;

    return 0;
}